<?php

namespace app\model;

use think\Model;

class User extends Model
{
    public function getAvatarAttr($value, $data)
    {
        $_module = request()->module();
        if($_module == 'api'){
            $host = request()->domain();
            if(strpos("ccc".$value,'http')){
                return $value;
            }
            return $host.$value;

        }else{
            return $value;
        }
    }
    public function getQrcodeAttr($value, $data)
    {
        $_module = request()->module();
        if($_module == 'api'){
            $host = request()->domain();
            if(strpos("ccc".$value,'http')){
                return $value;
            }
            return $host.$value;

        }else{
            return $value;
        }
    }

}
